<?php
namespace Home\Controller;
use Think\Controller;
class CommonController extends Controller{
	public function __construct()
	{
		header("Content-type:text/html;charset=utf-8");
		parent::__construct();
	}
	public function getRanks()
	{
		$conds['status'] = 1;
		$news = D("News")->getRank($conds,10);
		// var_dump($news);die;
		return $news;
	}
	public function error($message = '')
	{
		$message = $message ? $message : '系统发生错误';
		$this->assign('message',$message);
		$this->display('Index/error');
	}
}